//
//  Config.m
//  TianjinBoHai
//
//  Created by 李莹 on 15/1/16.
//  Copyright (c) 2015年 Binky Lee. All rights reserved.
//

#import "Config.h"



/**
 * 一般分割线颜色
 */
NSString *dividerColor = @"f3f3f3";

/**
 * 字体颜色
 */
NSString *textColor3 = @"333333";

/**
 * 字体颜色
 */
NSString *textColor6 = @"666666";

/**
 * 字体颜色
 */
NSString *textColor9 = @"999999";

/**
 * 一般背景颜色
 */
NSString *bgColor = @"f2fafa";

/**
 *  文字按钮  白色
 */
NSString *whiteColor = @"ffffff";

/**
 *  主颜色
 */
NSString *mainColor = @"4087fd";

/**
 *  文字\按钮  蓝色
 */
NSString *blueColor = @"13aeff";

/**
 *  分割线  灰色
 */
NSString *grayColor = @"ebebeb";

/**
 *  背景  灰色
 */
NSString *grayBGColor = @"f8f8f8";

/**
 *  控件边  灰色
 */
NSString * borderColor = @"f0f0f0";
@implementation Config

UIColor* getColor(NSString * hexColor)
{
    unsigned int red, green, blue;
    NSRange range;
    range.length = 2;
    
    range.location = 0;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&red];
    range.location = 2;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&green];
    range.location = 4;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&blue];
    
    return [UIColor colorWithRed:(float)(red/255.0f) green:(float)(green/255.0f) blue:(float)(blue/255.0f) alpha:1.0f];
}


- (BOOL) isBlankString:(NSString *)string
{
    if (string == nil || string == NULL) {
        return YES;
    }
    if ([string isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if ([[string stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
        return YES;
    }
    return NO;
}
@end

